package com.dwms.feign.oms;

import com.dwms.entity.PageResponse;
import com.dwms.entity.QueryRequest;
import com.dwms.entity.Result;
import com.dwms.entity.oms.orderLog.request.OrderLogQueryRequest;
import com.dwms.entity.oms.orderLog.response.OrderLogResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @ClassName: OrderLogController
 * @Description: OrderLog
 * @Create 2025-10-11 22:44:55
 * @Author WH
 * @Since 1.0.0
**/

@FeignClient(name = "oms-server", path = "/orderLog")
public interface OrderLogFeignClient {

    /**
     * 分页查询
     *
     * @param query
     *          查询参数
     * @return
     */
    @PostMapping("/findPage")
    Result<PageResponse<OrderLogResponse>> findPage(@RequestBody OrderLogQueryRequest query);

    /**
     *  根据ID查询
     *
     * @param query
     *          参数
     * @return
     */
    @PostMapping("/findById")
    Result findById(@RequestBody QueryRequest query);
    /**
     * 根据订单ID查询
     * @param query
     * @return
     */
    @PostMapping("/findByOrderId")
    Result<List<OrderLogResponse>> findByOrderId(@RequestBody QueryRequest query);

}
